<template>
  <div class="app-container">
    <h1>访问量为{{num}}</h1>
  </div>
</template>
<script>
import article from "@/api/article/article"
export default{
  data(){
    return{
      num:0
    }
  },
  created(){
    this.getCount()
  },
  methods:{
    getCount(){
      article.count()
        .then(response=>{
          this.num=response.data.readCount
        })
    },
  }
}
</script>
